#ifndef QV_FILEIO_H
#define QV_FILEIO_H

#include "qv_local.h"


/* Where to find bot-data and store stats */
#define QV_BOTAIFILE_DIR		"genetic/qvbotfiles/bots"
#define QV_BOTALIASFILE			"genetic/qvscripts/bots.txt"
#define QV_BOTALIASFILE_ORG		"genetic/qvscripts/botsorg.txt"
#define QV_BOTGENESFILE_DIR		"genetic/qvdata/genes"
#define QV_BOTSTATSFILE			"genetic/qvdata/botstats.csv"
#define QV_ROUNDNUMFILE			"genetic/qvdata/roundnum.txt"
#define QV_SETTINGSFILE			"genetic/qvdata/settings.ini"
#define QV_TESTBOTS_DIR			"genetic/qvdata/test"
#define QV_TESTBOTSFILE			"genetic/qvdata/test/testbots.txt"

/* Function declarations */
int readRoundNum(void);
void writeRoundNum(int roundNum);

QV_genData *readGenData(int roundNum);
void readGenDataFile(char *genFileName, int botNum, QV_genData *genData);
void writeGenData(int roundNum, QV_genData *genData);

void addBotEntry(char* botName, char* botAIFileName);
void restoreBotEntryFile(void);
void writeBotAIFile(char **botNormBasicGens);
void writeItemWeightsFile(char *botName, char **botNormItemWeightGens);

QV_settings *getSettings(void);
void freeSettings(void);

char **getTestBotNames(void);

void updateBotLogFile(QV_botData *botData);

#endif
